while True:
    user = 'xiaoming'
    password = '123456'
    u1 = input('请输入用户名')
    p1 = input('请输入密码')
    if u1 == user and p1 == password:
        print("宝马 X5 白色 500/天")
        print("奔驰 大G 黑色 1000/天")
        print("长安 面包车 白色 10/天")
        car = int(input('请输入您选择的车辆1--宝马，2--奔驰，3--长安'))
        day = int(input("请输入要租的天数"))
        if car == 1:
            if day<=5:
                print(f'{day*500}')
            elif day<=7:
                print(f'{day*500*0.85}')
            elif day <= 10:
                print(f'{day * 500 * 0.82}')
            else:
                print(f'{day * 500 * 0.8}')
        elif car == 2:
            if day<=5:
                print(f'{day*1000}')
            elif day<=7:
                print(f'{day*1000*0.85}')
            elif day <= 10:
                print(f'{day * 1000 * 0.82}')
            else:
                print(f'{day * 1000 * 0.8}')
        elif car == 3:
            if day<=5:
                print(f'{day*10}')
            elif day<=7:
                print(f'{day*10*0.85}')
            elif day <= 10:
                print(f'{day * 10 * 0.82}')
            else:
                print(f'{day * 10 * 0.8}')
        break
    else:
        print('账号或密码错误')
        continue

